<html>
<#include "../common/header.ftl">

<body>
<div id="wrapper" class="toggled">

    <#--边栏sidebar-->
    <#include "../common/nav.ftl">


    <#--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <ul class="breadcrumb">
                        <li>
                            <a href="/sell/seller/dataHand/analy">按年统计</a>
                        </li>
                        <li>
                            <a href="/sell/seller/dataHand/analyMonth">按月统计</a>
                        </li>
                        <li class="active">
                            <a href="/sell/seller/dataHand/analyWeek">按季统计</a>
                        </li>
                        <li>
                            <a href="/sell/seller/dataHand/analyProduct">按商品统计</a>
                        </li>
                        <li>
                            <a href="/sell/seller/dataHand/analyCustomer">按客户统计</a>
                        </li>
                        <li>
                            <a href="/sell/seller/dataHand/analySaleMan">按销售员统计</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-md-6 column">
                    <div style="height: 400px;width: 1000px">
                        <div class="layui-card-body" id="chartContainer" style="padding-bottom: 500px;">

                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

</body>
</html>
<script src="/sell/js/canvas.js"></script>
<script src="/sell/js/echarts.js"></script>
<script src="/sell/js/1-6-10.esl.js"></script>
<script src="/sell/js/jquery.min.js"></script>
<script>
    $(function () {
        console.log("111");
        $.ajax({
            type: 'GET',
            url: '/sell/seller/dataHand/analy/customerTurnOver',
            data: {},
            contentType: 'text/json',
            dataType: 'json',
            success: function (data) {
                console.log(data);
                statistics(data);
            }
        });

        function statistics(dataPoints) {
            new CanvasJS.Chart('chartContainer',{
                theme:'light7',//主题
                animationEnabled: true,
                title: {
                    text: "不同客户销售总额统计"
                },
                data: [
                    {
                        // 数据
                        type: "column",
                        dataPoints: dataPoints
                    }
                ]
            }).render();
        }
    })
</script>
